from django.shortcuts import render, HttpResponse


# Create your views here.

def now(request):
    import time

    now = time.time()

    return render(request, "timer.html", {"now": now})


# 练习路由控制器
def special_case_2020(request):
    return HttpResponse("special_case_2020")


def year_archive(request, year):
    return HttpResponse("year = " + year)


def month_archive(request, year, month):
    return HttpResponse(" no namespace: ---> " + year + "-" + month)


def article_detail(request, year, month, day):
    return HttpResponse("" + year + "-" + month + "-" + day)


def month_archive_names(request, month, year):
    return HttpResponse("演示路由分发： has namespace: ---> " + year + "-" + month)
